home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 076-100 / disk_084 / ed / getrhs.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  687b  |  38 lines

  1. /*
  2.  * Copyright 1987 Brian Beattie Rights Reserved.
  3.  *
  4.  * Permission to copy and/or distribute granted under the
  5.  * following conditions:
  6.  *
  7.  * 1). No charge may be made other than resonable charges
  8.  *    for reproduction.
  9.  *
  10.  * 2). This notice must remain intact.
  11.  *
  12.  * 3). No further restrictions may be added.
  13.  *
  14.  */
  15. #include <stdio.h>
  16. #include "tools.h"
  17. #include "ed.h"
  18.  
  19. getrhs(sub)
  20. char    *sub;
  21. {
  22.     if(inptr[0] == NL || inptr[1] == NL)    /* check for eol */
  23.         return( ERR );
  24.  
  25.     if(maksub(sub, MAXPAT) == NULL)
  26.         return( ERR );
  27.     
  28.     inptr++;        /* skip over delimter */
  29.     while(*inptr == SP || *inptr == HT)
  30.             inptr++;
  31.     if(toupper(*inptr) == 'G')
  32.     {
  33.         *inptr++;
  34.         return( 1 );
  35.     }
  36.     return( 0 );
  37. }
  38.